package com.zd.shopping.apis;

import android.content.Context;

import com.alibaba.fastjson.JSONObject;
import com.zwz.mall.api.BaseApi;
import com.zwz.mall.api.OnRequestListener;
import com.zwz.mall.config.Config;
import com.zwz.mall.managers.UserManager;
import com.zwz.mall.models.User;
import com.zwz.mall.utils.JSONUtils;
import com.zwz.mall.utils.SPUtils;
import com.zwz.mall.utils.SerialUtils;

import java.io.IOException;
import java.util.HashMap;

/**
 * Created by Administrator on 2019/7/9 0009.
 */

public class UserLoginApi extends BaseApi
{
    public String username;
    public String password;
    public User user;
    public Context context;

    @Override
    public void loadData(OnRequestListener requestListener) {
        HashMap<String, Object> hashMap = new HashMap<>();
        hashMap.put("username", username);
            hashMap.put("password", password);
        super.loadData(getBaseApiService().user_login(hashMap), requestListener);
    }

    @Override
    public void parseResult(JSONObject jsonObject) {
//        JSONObject date = JSONUtils.getJSONObject("data", jsonObject);
//        user = new User();
//        user.parse(date);

    }
}
